<?php

$im = @ImageCreate(288, 144) or die ("Cannot Initialize new GD image stream");
require_once('mysql_connect.php');
$query = "SELECT * FROM movie WHERE id=" . $_GET['id'];
$result = @mysql_query($query);
$row = @mysql_fetch_array($result);
$bg_color= ImageColorAllocate($im, 255, 255, 255);
$text_color = ImageColorAllocate($im, 0, 0, 0);
$path = $_SERVER['SCRIPT_FILENAME'];
$ttfont= str_replace('barcode.php','barcode.ttf',$path);
$ttfonttwo = str_replace('barcode.php','Vera.ttf',$path);


ImageTTFText($im, 30, 0, 10, 20, $text_color, $ttfont, "*" . unescape_data(trim($row['id'])) . "*");
ImageTTFText($im, 12, 0, 10, 40, $text_color, $ttfonttwo, "*" . unescape_data(trim($row['id'])) . "*");
ImageTTFText($im, 12, 0, 10, 60, $text_color, $ttfonttwo,  unescape_data(trim($row['name'])));

 
header("Content-type: image/png");
ImagePng($im);
?>